package com.mls.fivedistrict.pojo;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableLogic;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.NotBlank;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 消息表
 * </p>
 *
 * @author Five Team
 * @since 2018-06-26
 */
@Data
@Accessors(chain = true)
@TableName("t_message")
public class Message extends Model<Message> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 消息标题
     */
    @NotBlank(message = "消息标题不能为空")
    private String title;
    /**
     * 消息内容
     */
    private String content;
    /**
     * 消息类型
     */
    private String type;
    /**
     * 消息动作：打开url，打开富文本，查看存文本
     */

    private String action;
    private Date createDate;
    private String createBy;
    private Date updateDate;
    private String updateBy;
    @TableLogic
    private Boolean isDelete;
    private String status;

    public Boolean getDelete() {
        return isDelete;
    }

    public void setDelete(Boolean delete) {
        isDelete = delete;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
